cmake_minimum_required(VERSION 3.19)
project(ffmpeg C)

set(CMAKE_C_STANDARD 99)

aux_source_directory(./src DIR_SRC)

# ffmpeg 目录
set(FFMPEG_DIR D:/ffmpeg/ffmpeg-n4.4-14-g70405dd7e3-win64-lgpl-shared-4.4)
#SDL2所在目录
set(SDL2_DIR D:\\SDL2\\SDL2-2.0.14\\x86_64-w64-mingw32)

# include目录
include_directories(${FFMPEG_DIR}/include)
include_directories(${SDL2_DIR}\\include\\SDL2)

include_directories(./include)
#库目录
link_directories(${FFMPEG_DIR}/lib)
link_directories(${SDL2_DIR}\\lib)
# 库
link_libraries(
        avcodec
        avdevice
        avfilter
        avformat
        avutil
        swresample
        swscale
        mingw32
        SDL2main
        SDL2
        )


add_executable(ffmpeg ${DIR_SRC} )